package com.wr.web.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@ApiModel(value = "User",description = "用户实体类")
@Entity
@Table(name = "usertable")
public class User {
    @ApiModelProperty(value = "id",notes = "主键")
    @Id
    @Column(name = "user_id",length = 32)
    private int id;
    @ApiModelProperty(value = "name",notes = "用户名")
    @Column(name = "user_name",length = 8)
    private String name;
    @ApiModelProperty(value = "age",notes = "年龄")
    @Column(name = "user_age",length = 8)
    private int age;
    public User() {
    }

    public User(int id, String name, int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
